write quote & field "name" & ", " & field call & quote & tab & field "address" & tab & quote & field "city" & ", " & field "state" & space & field zip & quote & field "state" & return to file fileName
go to next card
end repeat
close file fileName
end mouseUp
-- part 34 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=85 top=162 right=179 bottom=200
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Telephone2
-- part 27 (field)
-- low flags: 00
-- high flags: 4002
-- rect: left=361 top=69 right=287 bottom=487
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: member data
-- part 35 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=31 top=212 right=240 bottom=79
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Find
----- HyperTalk script -----
on mouseUp
doMenu "Find..."
set the loc of message to 6,315
end mouseUp
-- part 36 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=104 top=216 right=237 bottom=184
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Entry
----- HyperTalk script -----
on mouseUp
visual effect wipe left
go last card
visual effect scroll left
doMenu "New Card"
tabKey
end mouseUp
-- part 37 (field)
-- low flags: 00
-- high flags: 0004
-- rect: left=302 top=165 right=184 bottom=347
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: MemberP
-- part 39 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=305 top=277 right=305 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 1012 / 1012
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
visual effect iris close
pop card
end mouseUp
-- part 40 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=398 top=25 right=47 bottom=470
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: back to radio
----- HyperTalk script -----
on mouseUp
go to card id 2983 of stack "Radio"
end mouseUp
-- part 42 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=91 top=318 right=340 bottom=193
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Packet Export
----- HyperTalk script -----
on mouseUp
set cursor to 4
put the short name of this stack & ".packet" into fileName
ask "Export text to what file?" with fileName
if it is empty then exit mouseUp
put it into fileName
open file fileName
go to first card
repeat for the number of cards
put field "call" into kall
if kall is empty or kall is "none" then
put space & space & space & space & space & space into kall -- 6 chars for no call
end if
if the charToNum of second char of kall >= 48 and second char of kall <= 57 then
put space after second char of kall
put space before first char of kall
else
put space after third char of kall
end if
if length of kall is 5 then
put space & space after kall --temporary 7 chars for kall
end if
if length of kall is 6 then
put space & space & space after kall --9 chars for kall
else
put space & space after kall --9 chars for kall and no call
end if
write kall to file fileName
put field "name" into name
put 1 into temp
repeat until temp is 0
get length of name
put 22 - it into temp -- 22 chars for name, 31 so far
put space after name
end repeat
write name to file fileName
put field "city" & ", " & field "state" into qth
put 1 into temp
repeat until temp is 0
get length of qth
put 23 - it into temp -- 23 chars for qth, 54 so far
put space after qth
end repeat
write qth to file fileName
put field "telephone1" into phone
put 1 into temp
repeat until temp is 0
get length of phone
put 14 - it into temp -- 14 chars for phone, 68 so far
put space after phone
end repeat
write phone to file fileName
put field "BBS" into bbs -- 6 chars for BBS, 74 total
if bbs is not empty then put "@" before bbs
write bbs & return to file fileName
go to next card
end repeat
close file fileName
set cursor to 1
end mouseUp
--Call
--call district
--name
--address
--city
--state
--zip
--telephone1
--telephone2
--member data
--MemberP
-- part 43 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=75 top=185 right=202 bottom=153
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: BBS
-- part 45 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=3 top=318 right=340 bottom=84
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Field fixer
----- HyperTalk script -----
--because the import script encountering an empty field sometimes lets
--an invisible tab or return character slip into the hc field, or the
--user accidentally puts a return character into a text field,
--when the hc database is exported it is all screwed up! So, this script
--fixes up the hc database for export.
on mouseUp
set cursor to 4
put the name of this bkgnd into bakground
go to first card of bkgnd bakground
repeat for the number of cards
get the name of this bkgnd
if it is not bakground then exit repeat
repeat with i = 1 to the number of fields
get last char of field i
if it is tab then put empty into last char of field i
repeat while last char of field i is return
get last char of field i
if it is return then
put empty into last char of field i
end if
end repeat
repeat while offset(return,field i) is not 0
get offset(return,field i)
put space & "*" & space into char it of field i
end repeat
end repeat
go next card
end repeat
end mouseUp
-- part 46 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=197 top=318 right=340 bottom=290
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Export Data
----- HyperTalk script -----
on mouseUp
put the short name of this stack & ".text" into fileName
ask "Export text to what file?" with fileName
if it is empty then exit mouseUp
put it into fileName
open file fileName
set cursor to 4
put the name of this bkgnd into bakground
go to first card of bkgnd bakground
repeat for the number of cards
get the name of this bkgnd
if it is not bakground then exit repeat
repeat with i = 1 to the number of fields
write field i & tab to file fileName
end repeat
write return to file fileName
go to next card
end repeat
close file fileName
set cursor to 1
end mouseUp
-- part 47 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=404 top=318 right=340 bottom=493
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Import Data
----- HyperTalk script -----
--to use this button, prepare at least as many HC background fields
--as fields separated by tabs of your text data file
-- by Ted Tripp, 4588 CR 523, Bayfield, CO 81122, 303-884-9029
on mouseUp
ask "Import text from which file?"
if it is empty then exit mouseUp
put it into fileName
open file fileName
set cursor to 4
repeat
read from file fileName until return -- get first record
if it is empty then
doMenu "Delete Card"
close file fileName
exit mouseUp
end if
put it into data
repeat with i = 1 to the number of fields
put offset(tab,data) into num --gets first field (until tab)
if num is 0 then -- last field of record has no tab
put data into field i -- writes last field
delete last char of field i -- deletes return char
if first char of field i is quote and last char of field i is quote then --deletes quote marks
delete first char of field i
delete last char of field i
end if
exit repeat -- stops
end if
put char 1 to (num - 1) of data into field i -- writes first field
repeat while last char of field i is tab -- pesky ASCII 9!
delete last char of field i
end repeat
if first char of field i is quote and last char of field i is quote then --deletes quote marks